import request from '@/utils/request'


// 查询合格证打印数据列表
export function listCertificate(query) {
  return request({
    url: '/certificate/certificate/list',
    method: 'get',
    params: query
  })
}

// 查询合格证打印数据详细
export function getCertificate(id) {
  return request({
    url: '/certificate/certificate/' + id,
    method: 'get'
  })
}

// 新增合格证打印数据
export function addCertificate(data) {
  return request({
    url: '/certificate/certificate',
    method: 'post',
    data: data
  })
}

// 修改合格证打印数据
export function updateCertificate(data) {
  return request({
    url: '/certificate/certificate',
    method: 'put',
    data: data
  })
}

// 删除合格证打印数据
export function delCertificate(id) {
  return request({
    url: '/certificate/certificate/' + id,
    method: 'delete'
  })
}
//创建临时文件接口
export function createTempfile(){
  return request({
    url: '/certificate/certificate/tempfile',
    method: 'post'
  })
}

//查询导出进度
export function queryExportProgress(){
  return request({
    url: '/certificate/certificate/progress',
    method: 'get'
  })
}

// code查询合格证管理详细
export function getCertificateByCode(code) {
  return request({
    url: '/certificate/certificate/code/' + code,
    method: 'get'
  })
}
